package com.neouton.crm.refundRecords.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.neouton.common.util.PageUtil;
import com.neouton.crm.prm.entity.ReturnedMoneyProgressVO;
import com.neouton.crm.prm.mapper.ReturnedMoneyProgressMapper;
import com.neouton.crm.prm.service.ReturnedMoneyProgressService;
import com.neouton.crm.refundRecords.entity.RefundProgressInfoVO;
import com.neouton.crm.refundRecords.mapper.RefundProgressMapper;
import com.neouton.crm.refundRecords.service.RefundProgressService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * 回款进展表
 *
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class RefundProgressServiceImpl implements RefundProgressService {
    @Resource
    private RefundProgressMapper refundProgressMapper;


    @Override
    public PageUtil<RefundProgressInfoVO> queryPage(IPage page, RefundProgressInfoVO entity) {
        return null;
    }

    @Override
    public void saveRefundProgress(RefundProgressInfoVO entity) {
        refundProgressMapper.insert(entity);
    }

    @Override
    public void saveComments(List<RefundProgressInfoVO> list) {
        refundProgressMapper.saveComments(list);
    }

    @Override
    public void updateRefundProgressById(RefundProgressInfoVO entity) {
        refundProgressMapper.updateByPrimaryKeySelective(entity);
    }

    @Override
    public int deleteRefundProgressById(Integer id) {
        return refundProgressMapper.deleteByPrimaryKey(Long.valueOf(id));
    }

    @Override
    public List<RefundProgressInfoVO> getProgressInfo(Integer id) {
        return refundProgressMapper.queryProgressInfo(id);
    }


}
